const shell = require('shelljs');
const createCommitMessage = require('../util/createCommitMessage');

function commit(options) {

  shell.exec(`

    git commit -m "${createCommitMessage(options)}"

  `, (error) => {
    if (error) {
      return console.error(error);
    }
  });

}

module.exports = commit;